/*
 * CTDR_Animation.h
 *
 *  Created on: 6 déc. 2010
 *      Author: mbenoit
 */

#ifndef CTDR_Animation_H_
#define CTDR_Animation_H_
#include "TGeoManager.h"
#include "TVirtualGeoTrack.h"
#include "TFile.h"
#include "TGeoBBox.h"
#include "CTDR_Interaction.h"
//#include "CTDR_Detecteur.h"



class CTDR_Animation : public TObject
{

      private :
             TGeoManager *Geo; // The geometry manager
             TString filename;
             TFile *f2; // The file where the objects are written
             int Ntracks; // The number of tracks
             int Nelectrons,Nholes;
             TGeoMedium *medium; // the material
             TGeoVolume *top ; // the box
             TGeoBBox *Pix; // The pixels
             TGeoVolume *pix; //the pixels volume
             double Lx,Ly,Lz;  // size of the box

      public :
             CTDR_Animation(double lx, double ly, double lz, CTDR_Interaction &electrons, CTDR_Interaction &holes,int i=0, int j=0);
             void AjoutePas(CTDR_Interaction &electrons, CTDR_Interaction &holes);
             void AjoutePasHoles(CTDR_Interaction &electrons, CTDR_Interaction &holes);
             void AjoutePasElectrons(CTDR_Interaction &electrons, CTDR_Interaction &holes);


             void Write();
	     //ClassDef(CTDR_Animation,0) // A geometry and event track visualization class

};


#endif /* CTDR_Animation_H_ */
